<?php



class KillmailMapBuilder {

	
	const CLASS_NAME = 'lib.model.map.KillmailMapBuilder';

	
	private $dbMap;

	
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap('propel');

		$tMap = $this->dbMap->addTable('killmail');
		$tMap->setPhpName('Killmail');

		$tMap->setUseIdGenerator(true);

		$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('CONTENT', 'Content', 'string', CreoleTypes::LONGVARCHAR, false, null);

		$tMap->addForeignKey('VICTIM_ID', 'VictimId', 'int', CreoleTypes::INTEGER, 'sf_guard_user', 'ID', false, null);

		$tMap->addColumn('VICTIM', 'Victim', 'string', CreoleTypes::VARCHAR, false, 50);

		$tMap->addColumn('ALLIANCE', 'Alliance', 'string', CreoleTypes::VARCHAR, false, 50);

		$tMap->addColumn('CORPORATION', 'Corporation', 'string', CreoleTypes::VARCHAR, false, 50);

		$tMap->addColumn('DESTROYED', 'Destroyed', 'string', CreoleTypes::VARCHAR, false, 20);

		$tMap->addColumn('SYSTEM', 'System', 'string', CreoleTypes::VARCHAR, false, 20);

		$tMap->addColumn('SECURITY', 'Security', 'string', CreoleTypes::VARCHAR, false, 3);

		$tMap->addColumn('DAMAGE_TAKEN', 'DamageTaken', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('KILL_DATE', 'KillDate', 'int', CreoleTypes::TIMESTAMP, false, null);

	} 
} 